package com.stottlerhenke.simbionic.editor;

import javax.swing.Icon;
import javax.swing.ImageIcon;

public class SB_Folder extends UserObject
{
	private static final long serialVersionUID = 2302585093L + 9;
	protected static ImageIcon _icon = null;
	protected boolean _editable = true;

	public SB_Folder()  // constructor for Externalizable object
	{
	}

	public SB_Folder(String name)
	{
		super(name);
	}

	public Icon getIcon()
	{
		return javax.swing.plaf.metal.MetalIconFactory.getTreeFolderIcon();
	}

	public boolean isCellEditable()
	{
		return _editable;
	}

	public boolean isNameValid(String name)
	{
		return name.length() > 0;
	}

	public boolean shouldSort() { return true; }
	public String getSortName() { return " " + _name; }

	/**
	 * @return Returns the editable.
	 */
	public boolean isEditable() {
		return _editable;
	}
	/**
	 * @param editable The editable to set.
	 */
	public void setEditable(boolean editable) {
		_editable = editable;
	}
}
